<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<%@include file="base.jsp" %>
<%
    String socketPath = request.getServerName() + ":" + request.getServerPort() + "/";
    pageContext.setAttribute("socketPath", socketPath);
%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
    <meta name="description" content=""/>
    <meta name="author" content=""/>
    <link href="https://fonts.googleapis.com/css?family=Lato:100,300,400,700,900" rel="stylesheet" type="text/css"/>
    <link rel="icon" type="images/x-icon" href="${ctx}file/images/favicon.ico">
    <title>聊天-ArvinClub</title>
    <!-- Bootstrap core CSS -->
    <link href="${ctx}vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
    <!-- Additional CSS Files -->
    <link rel="stylesheet" href="${ctx}assets/css/fontawesome.css" type="text/css"/>
    <link rel="stylesheet" href="${ctx}assets/css/templatemo-style.css" type="text/css"/>
    <link rel="stylesheet" href="${ctx}assets/css/owl.css" type="text/css"/>
    <link rel="stylesheet" href="${ctx}assets/css/lightbox.css" type="text/css"/>
    <style>

        .message1 p {
            font-size: 18px;
        }

        @media (max-width: 845px) {
            .section-heading {
                padding: 40px 0 60px 0;
            }

            section.contact-me {
                padding-bottom: 60px;
            }

            .myimg {
                margin: 0 auto;
                text-align: center;
            }

            .message1 p {
                font-size: 14px;
            }

        }

        .myh:hover {
            color: #4f9bff;
        }

        .myh {
            color: #a43f49;
        }

        .section-heading a {
            color: #a43f49;
        }

    </style>

</head>

<body onload="javascript:document.getElementById('text').focus()">
<div id="page-wraper" style="min-height: 100vh">
    <!-- Sidebar Menu -->
    <div class="responsive-nav">
        <i class="fa fa-bars" id="menu-toggle"></i>
        <div id="menu" class="menu">
            <i class="fa fa-times" id="menu-close"></i>
            <div class="container">

                <div class="author-content" style="margin: 80px 0 60px 0">
                    <h4 style="font-size: 40px">${sessionScope.user.name}</h4>
                    <c:choose>
                        <c:when test="${user.admin > 0}">
                            <p style="margin-top: 10px;cursor:pointer"
                               onclick="javascript:window.open('${ctx}admin/manager.html')">管理员</p>
                        </c:when>
                        <c:otherwise>
                            <p style="margin-top: 10px">欢迎</p>
                        </c:otherwise>
                    </c:choose>
                </div>
                <nav class="main-nav" role="navigation">
                    <ul class="main-menu">
                        <li><a href="${ctx}user/blogs.html">网站首页</a></li>
                        <li><a href="${ctx}user/attention.html">关注动态</a></li>
                        <li><a href="${ctx}user/page.html">我的主页</a></li>
                        <li><a href="${ctx}user/chat.html" style="background: #fff;color: #8c363e">在线聊天</a></li>
                        <li><a href="${ctx}user/search.html">查找内容</a></li>
                        <li><a href="${ctx}user/update.html">更新日志</a></li>
                        <li><a href="${ctx}user/exit">退出登录</a></li>
                    </ul>
                </nav>
                <div class="social-network">

                </div>
                <div class="copyright-text">
                    <p>Copyright &copy; 2019 Arvin<br>联系方式: <a
                            href="mailto:arvin5445@qq.com" target="_top">arvin5445@qq.com</a><br><a
                            href="http://beian.miit.gov.cn/" target="_blank">浙ICP备19031638号-1</a></p>
                </div>
            </div>
        </div>
    </div>

    <section class="section contact-me" data-section="section4" style="padding-bottom: 0;border: unset">
        <div class="container" style="max-width: unset">
            <div class="section-heading">
                <h1 style="word-break: break-word"><a class="myh" href="${ctx}user/page.html/${host.id}"
                                                      style="font-size: unset">@${host.name}</a> ${msg}</h1>
                <div class="line-dec"></div>
            </div>
            <div class="row">
                <div class="right-content" style="margin: 0 auto;width: 100%">
                    <div class="container"
                         style="max-width: unset">
                    </div>
                </div>
            </div>
        </div>
    </section>

    <section class="section about-me" data-section="section1" style="border-bottom: none">
        <div class="container" style="max-width: unset;text-align: center">
            <c:choose>
                <c:when test="${listPage.list == null || fn:length(listPage.list) == 0}">
                    <div class="myimg"
                         style="text-align: center; border-top: 2px solid rgba(250, 250, 250, 0.1);">
                        <span style="margin-top: 35px;display: inline-block;color: #666">没有任何内容</span>

                    </div>
                </c:when>
                <c:otherwise>
                    <div class="myimg"
                         style="text-align: center; border-bottom: 2px solid rgba(250, 250, 250, 0.1);">
                    </div>
                    <c:forEach items="${listPage.list}" var="user">
                        <div class="myimg"
                             style="text-align: center; border-bottom: 2px solid rgba(250, 250, 250, 0.1);">
                            <h4 style="text-align: left;margin: 50px;display: inherit;">
                                <a class="myh" href="${ctx}user/page.html/${user.id}">
                                    @<c:out value="${user.name}"/>
                                </a>
                            </h4>
                            <button onclick="window.location.href='${ctx}user/page.html/${user.id}'"
                                    style="float: right">查看详情
                            </button>
                            <br>
                            <br>
                            <br>
                        </div>
                    </c:forEach>
                </c:otherwise>
            </c:choose>
        </div>
    </section>

</div>
<!-- Scripts -->
<!-- Bootstrap core JavaScript -->
<script src="${ctx}vendor/jquery/jquery.min.js" type="text/javascript"></script>
<script src="${ctx}vendor/bootstrap/js/bootstrap.bundle.min.js" type="text/javascript"></script>

<script src="${ctx}assets/js/isotope.min.js" type="text/javascript"></script>
<script src="${ctx}assets/js/owl-carousel.js" type="text/javascript"></script>
<script src="${ctx}assets/js/lightbox.js" type="text/javascript"></script>
<script src="${ctx}assets/js/custom.js" type="text/javascript"></script>
<script>
    console.log("感谢您帮我测试,如果发现BUG还请留言。");
</script>


</body>
</html>